package com.stlm2.dems.entity;


public enum CommissionSource {

    Self(1) {
        public String toString() {
            return "一级分佣";
        }
    },
    Lower(4) {
        public String toString() {
            return "二级分佣";
        }
    },
    Lowest(7) {
        public String toString() {
            return "三级分佣";
        }
    },
    Partner(10) {
        public String toString() {
            return "合伙人分佣";
        }
    };

    private final int val;

    CommissionSource(int n) {
        val = n;
    }

    public int getIntValue() {
        return val;
    }

    public static CommissionSource getByIntValue(int n) {
        switch (n) {
            case 1:
                return Self;
            case 4:
                return Lower;
            case 7:
                return Lowest;
            case 10:
                return Partner;
            default:
                return null;
        }
    }

}
